package cn.com.business.calculate;

import org.springframework.stereotype.Component;

public abstract class AbstractCalculate {
	private static String description;
	private static int money;
	
	private static String salesmanID;
	private static int shopNum;
	private static int salsNum;
	private static int leftIntegral;
	private static int rightIntegral;
	private static int calculateProcess;
	
	
	public static String getDescription() {
		return description;
	}
	public static void setDescription(String description) {
		AbstractCalculate.description = description;
	}
	public static int getMoney() {
		return money;
	}
	public static void setMoney(int money) {
		AbstractCalculate.money = money;
	}
	public static String getSalesmanID() {
		return salesmanID;
	}
	public static void setSalesmanID(String salesmanID) {
		AbstractCalculate.salesmanID = salesmanID;
	}
	public static int getShopNum() {
		return shopNum;
	}
	public static void setShopNum(int shopNum) {
		AbstractCalculate.shopNum = shopNum;
	}
	public static int getSalsNum() {
		return salsNum;
	}
	public static void setSalsNum(int salsNum) {
		AbstractCalculate.salsNum = salsNum;
	}
	public static int getLeftIntegral() {
		return leftIntegral;
	}
	public static void setLeftIntegral(int leftIntegral) {
		AbstractCalculate.leftIntegral = leftIntegral;
	}
	public static int getRightIntegral() {
		return rightIntegral;
	}
	public static void setRightIntegral(int rightIntegral) {
		AbstractCalculate.rightIntegral = rightIntegral;
	}
	
	
	public static int getCalculateProcess() {
		return calculateProcess;
	}
	public static void setCalculateProcess(int calculateProcess) {
		AbstractCalculate.calculateProcess = calculateProcess;
	}


	private static CalulateIntegral integral;
	
	
	public static CalulateIntegral getIntegral() {
		return integral;
	}
	public static void setIntegral(CalulateIntegral integral) {
		AbstractCalculate.integral = integral;
	}


	private AbstractCalculate calculate;
	public AbstractCalculate(AbstractCalculate calculate){
		this.calculate = calculate;
	}
	public void next(){
		if(calculate != null)
			calculate.calculate();
	}
	
	public abstract void calculate();
}
